<!DOCTYPE HTML>
<html>
<head>
    <include file="Common:header_include"/>
    <title>编辑患者</title>
</head>
<body>
<div class="pd-20">
    <form action="{:U('edit')}" method="post" class="form form-horizontal" id="form">
        <input name="id" value="{$data.id}" type="hidden">
        <!--<div class="row cl">-->
            <!--<label class="form-label col-3"><span class="c-red">*</span>用户名：</label>-->
            <!--<div class="formControls col-5">-->
                <!--<input type="text" class="input-text" placeholder="请输入" name="name" datatype="*" nullmsg="不能为空" value="{$data.name}">-->
            <!--</div>-->
            <!--<div class="col-4"></div>-->
        <!--</div>-->
        <div class="row cl">
            <label class="form-label col-3"><span class="c-red">*</span>真实姓名：</label>
            <div class="formControls col-5">
                <input type="text" class="input-text" placeholder="请输入" name="realname" value="{$data.realname}" datatype="*"  nullmsg="请输入您的姓名">
            </div>
            <div class="col-4"></div>
        </div>
        <div class="row cl">
            <label class="form-label col-3">昵称：</label>
            <div class="formControls col-5">
                <input type="text" class="input-text" placeholder="请输入" name="nick"  value="{$data['nick']}">
            </div>
            <div class="col-4"></div>
        </div>
        <!--<div class="row cl">-->
            <!--<label class="form-label col-3"><span class="c-red"></span>曾用名：</label>-->
            <!--<div class="formControls col-5">-->
                <!--<input type="text" class="input-text" placeholder="请输入" name="usedname"  value="{$data['usedname']}">-->
            <!--</div>-->
            <!--<div class="col-4"></div>-->
        <!--</div>-->
        <!--<div class="row cl" >-->
            <!--<label class="form-label col-3"><span class="c-red"></span>省区：</label>-->
            <!--<div class="formControls col-5">-->
                <!--<span class="select-box">-->
                <!--<select class="select Validform_error" size="1" name="provenceID" onchange="onchangeProvince($(this))"  id="provinceid">-->
                     <!--<option value="" selected="" disabled="disabled">请选择</option>-->
                   <!--<volist name=":getProvinceList(1)" id="v">-->
                        <!--<option value="{$v.aerainfo_id}"   <if condition="$data['provenceid'] eq $v['aerainfo_id']">selected</if>>{$v.aerainfo_name}</option>-->
                    <!--</volist>-->
                <!--</select>-->
                <!--</span>-->
            <!--</div>-->
            <!--<div class="col-4"></div>-->
        <!--</div>-->
        <!--<div class="row cl">-->
            <!--<label class="form-label col-3"><span class="c-red"></span>市区：</label>-->
            <!--<div class="formControls col-5">-->
                <!--<span class="select-box">-->
                <!--<select class="select Validform_error" size="1" name="cityid"  onchange="onchangecity($(this))" id="city">-->
                   <!--<option value="{$data.city.aerainfo_id}" >{$data.city.aerainfo_name}</option>-->
                <!--</select>-->
                <!--</span>-->
            <!--</div>-->
            <!--<div class="col-4"></div>-->
        <!--</div>-->
        <!--<div class="row cl" >-->
            <!--<label class="form-label col-3"><span class="c-red"></span>区域：</label>-->
            <!--<div class="formControls col-5">-->
                <!--<span class="select-box">-->
                <!--<select class="select Validform_error" size="1" name="regionid"  id="district">-->
                    <!--<option value="{$data.region.aerainfo_id}" >{$data.region.aerainfo_name}</option>-->
                <!--</select>-->
                <!--</span>-->
            <!--</div>-->
            <!--<div class="col-4"></div>-->
        <!--</div>-->
        <div class="row cl">
            <label class="form-label col-3"><span class="c-red"></span>头像：</label>
            <div class="formControls col-5">
                <input type="file" class="input-text" name="coverFile" accept="image/*">
            </div>
            <div class="col-4">
                <if condition="$data['cover']">
                    已上传，<a href="javascript:void(0);" onclick="previewPictures('__UPS__{$data.cover}')">预览</a>
                </if>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-3"><span class="c-red">*</span>性别：</label>
            <div class="formControls col-5">
            <span class="select-box">
                <select class="select Validform_error" size="1" name="sex" >
                    <option value="" selected="" disabled="disabled">请选择</option>
                    <option value="1" <if condition="$data['sex'] eq 1">selected</if>>男</option>
                    <option value="0" <if condition="$data['sex'] eq 0">selected</if>>女</option>
                </select>
            </span>
            </div>
            <div class="col-4"></div>
        </div>
        <div class="row cl">
            <label class="form-label col-3"><span class="c-red"></span>出生日期：</label>
            <div class="formControls col-5">
                <input type="text" class="input-text" placeholder="请输入" name="birthday"    onfocus="WdatePicker({skin:'whyGreen',dateFmt: 'yyyy-MM-dd' })";  value="{:$data['birthday']}">
            </div>
            <div class="col-4"></div>
        </div>
        <div class="row cl">
            <label class="form-label col-3"><span class="c-red">*</span>手机号：</label>
            <div class="formControls col-5">
                <input type="text" class="input-text" placeholder="请输入"  datatype="*" nullmsg="请输入手机号" maxlength="11" name="phone" <if condition="!empty($data['phone'])"> value="{$data.phone}"</if>>
            </div>
            <div class="col-4"></div>
        </div>
        <div class="row cl">
            <label class="form-label col-3"><span class="c-red"></span>身份证：</label>
            <div class="formControls col-5">
                <input type="text" class="input-text" placeholder="请填写身份证" name="idcard" value="{$data.idcard}">
            </div>
            <div class="col-4"></div>
        </div>
        <div class="row cl">
            <label class="form-label col-3">患者的介绍：</label>
            <div class="formControls col-5">
                <script id="content" name="remark" type="text/plain" style="width:100%;height:400px;">{:htmlspecialchars_decode($data['remark'])}</script>
                </div>
                <div class="col-4"></div>
       </div>
        <div class="row cl">
            <div class="col-9 col-offset-3">
                <input class="btn btn-primary radius" type="submit" value="提交">
            </div>
        </div>
    </form>
</div>
<include file="Common:footer_include"/>
</body>
<script>
    $(function () {
        var ue = UE.getEditor('content');
    });
//    function onchangeProvince(jqObj){
//        var province_id = jqObj.val();
//        var citycheck = $('#city');
//        citycheck.html('');
//        $.ajax({
//            url: '{:U("Hospitalinfo/getCityListJson")}?province_id=' + province_id,
//            type: 'post',
//            enctype: 'multipart/form-data',
//            success: function (data) {
//                $.each(data, function (i, item) {
//                    citycheck.append('<option value="' + item.aerainfo_id + '" >' + item.aerainfo_name + '</option>');
////                    var diseaseHtml="<div class='skin-minimal check-box' style='width: 200px;margin-top: 5px'> <div class='check-box'> <input type='checkbox' name='disease_id[]' checked value='"+item.id+"'>"+item.title+"</div> </div>";
////                    diseaseBox.append(diseaseHtml);
//                });
//                onchangecity(citycheck);
//            }
//        });
//
//    }
//    function onchangecity(jqObj){
//        var city_id = jqObj.val();
//        var districtcheck = $('#district');
//        var ajaxurl='{:U("Hospitalinfo/getDistrictJson")}?city_id=' + city_id;
//        districtcheck.html('');
//        $.ajax({
//            url:ajaxurl ,
//            type: 'post',
//            enctype: 'multipart/form-data',
//            success: function (data) {
//                $.each(data, function (i, items) {
//                    districtcheck.append('<option value="'+ items.aerainfo_id + '" >'+ items.aerainfo_name + '</option>');
//                });
//            }
//        });
//    }
    </script>
</html>